﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MessageBox使用
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void MainForm_MouseClick(object sender, MouseEventArgs e)
        {
            MessageBox.Show("是否打开新窗体？","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Warning);
            if(DialogResult==DialogResult.Yes)
            {
                NewForm newForm = new NewForm();
                newForm.Show();
            }
            else
            {

            }
        }
    }
}
